<template>
  <!-- 作业查询->影像查询->综合查询页面 -->
  <div class="fillcontain">
    <div class="fastQuery bgfff">
      <el-form :model="searchParams" :rules="rules" ref="ruleForm" label-width="130px">
        <el-collapse v-model="activeNames">
          <el-collapse-item name="1">
            <template slot="title">
              <i class="el-icon-tickets pr5"></i> 业务查询条件
            </template>
            <!-- 业务查询条件表单 -->
            <el-row class="bor_top search_container">
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">受理号</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.busiNO" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">保单号</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.policyNO" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">投保人</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.policyer" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">被保人</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.insured" placeholder=""></el-input>
                </el-col>
              </el-col>
            </el-row>
          </el-collapse-item>

          <el-collapse-item name="2">
            <template slot="title">
              <i class="el-icon-tickets pr5"></i> 影像查询条件
            </template>
            <!-- 影像查询条件表单 -->
            <el-row class="bor_top search_container">
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">存仓号码</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.stockID" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">组号</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.groupNO" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">扫描日期</label>
                </el-col>
                <el-col :span="16">
                  <div class="block">
                    <el-date-picker clearable value-format="yyyy-MM-dd" v-model="searchParams.begintime" type="date"
                                    placeholder="选择日期">
                    </el-date-picker>
                  </div>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">电子标识号</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.serno" placeholder=""></el-input>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">短期险保单号</label>
                </el-col>
                <el-col :span="16">
                  <el-input clearable v-model="searchParams.policyno16" placeholder=""></el-input>
                </el-col>
              </el-col>
            </el-row>
          </el-collapse-item>

          <el-collapse-item name="3">
            <template slot="title">
              <i class="el-icon-tickets pr5"></i> 辅助查询条件
            </template>
            <!-- 辅助查询条件表单 -->
            <el-row class="bor_top search_container">
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">业务类型</label>
                </el-col>
                <el-col :span="16">
                  <el-select :disabled="disableParam.sbusiType" clearable v-model="searchParams.busiType"
                             @change="isNoCasenoShow()" placeholder="">
                    <el-option
                        v-for="item in busiTypeList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">被保险人<br/>出生日期</label>
                </el-col>
                <el-col :span="16">
                  <div class="block">
                    <el-date-picker clearable value-format="yyyy-MM-dd" v-model="searchParams.birthday" type="date"
                                    placeholder="">
                    </el-date-picker>
                  </div>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">分支公司</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.comCode" placeholder="">
                    <el-option
                        v-for="item in ssyMap"
                        :key="item.sbusiorgid"
                        :label="item.sorgname"
                        :value="item.sbusiorgid">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">险种类型</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.sproductType" placeholder="">
                    <el-option
                        v-for="item in productTypeList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">是否列印<br/>(有效性)</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.isPrint" placeholder="是否列印(有效性)" @clearable="true">
                    <el-option v-for="item in isPrintList" :key="item.value" :label="item.label"
                               :value="item.value"></el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">文件类型</label>
                </el-col>
                <el-col :span="16">
                  <el-select
                      clearable
                      v-model="searchParams.sdocType"
                      filterable
                      multiple
                      collapse-tags
                      placeholder="请选择">
                    <el-option
                        v-for="item in docTypeMap"
                        :key="item.sdoctypeid"
                        :label="item.sdoctypnam"
                        :value="item.sdoctypnam">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="12" class="common-box" v-if="isNoCasenoShowValue">
                <div>
                  <el-col :span="10" class="common-lab">
                    <label class="labelName">是否查询无受理号的补充文件</label>
                  </el-col>
                  <el-col :span="14">
                    <el-select clearable v-model="searchParams.isNoCaseno" placeholder="">
                      <el-option
                          v-for="item in isNoCasenoList"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                      </el-option>
                    </el-select>
                  </el-col>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">排序方式</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.imgsort" placeholder="">
                    <el-option
                        v-for="item in imgsortList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">排序条件1</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.imgsortorder1" placeholder="">
                    <el-option
                        v-for="item in imgsortorder1List"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">排序条件2</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.imgsortorder2" placeholder="">
                    <el-option
                        v-for="item in imgsortorder1List"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
              <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                  <label class="labelName">排序条件3</label>
                </el-col>
                <el-col :span="16">
                  <el-select clearable v-model="searchParams.imgsortorder3" placeholder="">
                    <el-option
                        v-for="item in imgsortorder1List"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                </el-col>
              </el-col>
            </el-row>
            <!-- <el-col :span="6" class="common-box">
                <el-col :span="8" class="common-lab">
                     <label class="labelName">文件类型</label>
                </el-col>
                 <el-col :span="20">
                    <el-select placeholder="" >
                        <el-row calss="pt10 pb10">
                            <el-col :span="4" calss="text_center" style="text-align: center;">
                                过滤条件
                            </el-col>
                            <el-col :span="6" class="pr5">
                                <el-select v-model="option" placeholder="单证类型">
                                    <el-option
                                        v-for="item in options"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-col>
                            <el-col :span="6" class="pr15"><el-input placeholder="请输入"></el-input></el-col>
                            <el-col :span="6" >
                                <el-button>过滤</el-button>
                                <el-button>重置</el-button>
                            </el-col>
                        </el-row>
                        <el-option></el-option>
                        <el-table
                        ref="multipleTable"
                        :data="docTypeMap"
                        tooltip-effect="dark"
                        style="width: 100%"
                        @selection-change="handleSelectionChange">
                            <el-table-column
                            type="selection"
                            width="55">
                            </el-table-column>
                            <el-table-column
                            property="sdoctypnam"
                            label="单证类型">
                            </el-table-column>
                        </el-table>
                        <el-row class="mt10">
                            <el-col :span="24" calss="text_center" style="text-align: center;">
                                 <el-button type="primary" @click="selectDocType">选择</el-button>
                            </el-col>
                        </el-row>
                    </el-select>
                 </el-col>
            </el-col> -->
          </el-collapse-item>
        </el-collapse>
      </el-form>
      <el-row class="pt20 pb20">
        <el-col :span="24" class="text_center">
          <el-button type="primary" icon="el-icon-search" @click="subGetList"></el-button>
          <el-button type="primary" plain icon="el-icon-refresh" @click="resetSearch"></el-button>
        </el-col>
      </el-row>
    </div>
    <div class="contain bor_top" id="treeDataModule" v-show="treeDataModuleShow">
      <el-row>
        <el-col :span="6">
          <div class="">
            <!-- tree菜单控件 -->
            <el-tree
                :data="treeData"
                show-checkbox
                node-key="id"
                ref="tree"
                check-strictly
                default-expand-all
                @check-change="checkChange"
                @node-click="nodeClick">
            </el-tree>
          </div>
        </el-col>
        <el-col :span="18">
          <!-- 表单 -->
          <el-form ref="formParams" label-width="120px">
            <el-row class="mt20 baseInfo">
              <el-col :span="8">
                <el-form-item label="受理号">
                  <el-input disabled v-model="planInfo.busiNO"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="保单号" prop="chdrnum">
                  <el-input disabled v-model="planInfo.policyNO"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="分公司" prop="chdrnum">
                  <el-input disabled v-model="planInfo.comCode"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="投保人">
                  <el-input disabled v-model="planInfo.policyer"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="被保人" prop="chdrnum">
                  <el-input disabled v-model="planInfo.insured"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="支公司" prop="chdrnum">
                  <el-input disabled v-model="planInfo.branchCode"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <!-- 表格 -->
          <div class="contain bor_top">
            <el-row class="mt20">
              <el-col :span="24" class="pb15 pl30">
                <el-button type="danger" class="Defaultbutton" @click="bathchShow_newObject()">查看</el-button>
              </el-col>
            </el-row>
            <div class="table_container pl30">
              <el-table
                  ref="multipleTable"
                  @selection-change="handleSelectionChange"
                  v-loading="loading"
                  :data="tableDataList"
                  highlight-current-row
                  header-cell-class-name="table-header-class"
                  style="width:100%">
                <el-table-column
                    type="selection"
                    width="55" :selectable="interceptVip">
                </el-table-column>
                <el-table-column
                    width="80"
                    label="影像"
                    align='center'>
                  <template slot-scope="scope">
                    <span class="operationIcon" @click="showImage_newObject(scope.row)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                        <i class="el-icon-camera"></i>
                    </span>
                  </template>
                </el-table-column>
                <el-table-column
                    width="80"
                    label="备注"
                    align='center'>
                  <template slot-scope="scope">
                    <span class="operationIcon" @click="memoGo(scope.row.busiType, scope.row.itemid)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                      <i v-if="!scope.row.remark" class="el-icon-tickets"></i>
									    <i v-if="scope.row.remark" class="el-icon-info"></i>
                    </span>
                  </template>
                </el-table-column>

                <el-table-column
                    width="80"
                    label="记录"
                    align='center'>
                  <template slot-scope="scope">
                                <span class="operationIcon"
                                      @click="updateRecordGo(scope.row.busiType, scope.row.itemid)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                                    <i class="el-icon-edit-outline"></i>
                                </span>
                  </template>
                </el-table-column>
                <el-table-column
                    min-width="120"
                    property="serno"
                    label="流水号"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    min-width="120"
                    property="docTyp"
                    label="文件类型"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    min-width="150"
                    property="stockID"
                    label="存仓号码"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    min-width="120"
                    property="groupNo"
                    label="组号"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    min-width="160"
                    property="scanDate"
                    label="扫描日期"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    min-width="160"
                    property="scanTime"
                    label="扫描时间"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column min-width="120" label="是否新受理" align='center' show-overflow-tooltip>
                  <template slot-scope="scope">
                    <span v-if="scope.row.subbusitype == ''">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <span v-else>{{scope.row.subbusitype}}</span>
                  </template>
                </el-table-column>
                <el-table-column min-width="120" label="是否列印" align='center' show-overflow-tooltip>
                  <template slot-scope="scope">
                    <span v-if="scope.row.isPrint == 0">N</span>
                    <span v-if="scope.row.isPrint == 1">Y</span>
                  </template>
                </el-table-column>
                <el-table-column
                    min-width="120"
                    property="remark"
                    label="最新备注"
                    align='center'
                    show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                    width="100"
                    property="address"
                    label="操作"
                    align='center'>
                  <template slot-scope="scope">
                    <el-button type="text" size="small" @click="imagInfoGo(
                                    scope.row.busiType,
                                    scope.row.policyNo,
                                    scope.row.busiNo,
                                    scope.row.subbusitype,
                                    scope.row.productType,
                                    scope.row.docTyp,
                                    scope.row.stockID,
                                    scope.row.groupNo,
                                    scope.row.scanDate,
                                    scope.row.scanTime,
                                    scope.row.isPrint,
                                    scope.row.ishcprint,
                                    scope.row.version,
                                    scope.row.itemid,
                                    scope.row.agentNo,
                                    scope.row.updateflag,
                                    scope.row.company
                                )" :disabled="!interceptVip(scope.row,scope.index)">影像信息
                    </el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!-- 分页信息 -->
              <el-row>
                <!-- <el-col :span="4" class="button_pagination">
                    <el-button type="primary" @click="bathchShow_newObject()">查看</el-button>
                </el-col> -->
                <el-col :span="24">
                  <div class="pagination">
                    <el-pagination
                        background
                        v-if='paginationsTree.total > 0'
                        :page-sizes="paginationsTree.pageSizes"
                        :page-size="paginationsTree.pageSize"
                        :layout="paginationsTree.layout"
                        :total="paginationsTree.total"
                        :current-page='paginationsTree.pageIndex'
                        @current-change='handleCurrentChangeTree'
                        @size-change='handleSizeChangeTree'>
                    </el-pagination>
                  </div>
                </el-col>
              </el-row>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>

    <!-- 表格 -->
    <div class="contain bor_top" id="tableDataModule" v-show="tableDataModuleShow">
      <el-row class="mt20">
        <el-col :span="24" class="pb15">
          <el-button type="danger" class="Defaultbutton" @click="bathchShow_newObject()">查看</el-button>
        </el-col>
      </el-row>
      <div class="table_container">
        <el-table
            ref="multipleTable"
            @selection-change="handleSelectionChange"
            v-loading="loading"
            :data="tableDataList"
            highlight-current-row
            header-cell-class-name="table-header-class"
            style="width:100%">
          <el-table-column
              type="selection"
              width="55" :selectable="interceptVip">
          </el-table-column>
          <el-table-column
              min-width="60"
              show-overflow-tooltip
              label="影像"
              align='center'>
            <template slot-scope="scope">
              <span class="operationIcon" @click="showImage_newObject(scope.row)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                  <i class="el-icon-camera"></i>
              </span>
            </template>
          </el-table-column>
          <el-table-column
              min-width="60"
              show-overflow-tooltip
              label="备注"
              align='center'>
            <template slot-scope="scope">
              <span class="operationIcon" @click="memoGo(scope.row.busiType, scope.row.itemid)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                <i v-if="!scope.row.remark" class="el-icon-tickets"></i>
                <i v-if="scope.row.remark" class="el-icon-info"></i>
              </span>
            </template>
          </el-table-column>
          <el-table-column
              min-width="60"
              show-overflow-tooltip
              label="记录"
              align='center'>
            <template slot-scope="scope">
              <span class="operationIcon" @click="updateRecordGo(scope.row.busiType, scope.row.itemid)" :style="{'pointer-events':!interceptVip(scope.row, scope.index) ? 'none': ''}">
                <i class="el-icon-edit-outline"></i>
              </span>
            </template>
          </el-table-column>
          <el-table-column
              min-width="120"
              show-overflow-tooltip
              property="serno"
              label="流水号"
              align='center'>
          </el-table-column>
          <el-table-column
              min-width="150"
              show-overflow-tooltip
              property="docTyp"
              label="文件类型"
              align='center'>
          </el-table-column>
          <el-table-column
              min-width="120"
              show-overflow-tooltip
              property="stockID"
              label="存仓号码"
              align='center'>
          </el-table-column>
          <el-table-column
              min-width="120"
              show-overflow-tooltip
              property="groupNo"
              label="组号"
              align='center'>
          </el-table-column>
          <el-table-column
              min-width="160"
              show-overflow-tooltip
              property="scanDate"
              label="扫描日期"
              align='center'>
          </el-table-column>
          <el-table-column
              min-width="160"
              show-overflow-tooltip
              property="scanTime"
              label="扫描时间"
              align='center'>
          </el-table-column>
          <el-table-column min-width="120" label="是否新受理" align='center'>
            <template slot-scope="scope">
              <span v-if="scope.row.subbusitype == ''">&nbsp;&nbsp;&nbsp;&nbsp;</span>
              <span v-else>{{scope.row.subbusitype}}</span>
            </template>
          </el-table-column>
          <el-table-column min-width="120" label="是否列印" align='center'>
            <template slot-scope="scope">
              <span v-if="scope.row.isPrint == 0">N</span>
              <span v-if="scope.row.isPrint == 1">Y</span>
            </template>
          </el-table-column>
          <el-table-column
              min-width="120"
              show-overflow-tooltip
              property="remark"
              label="最新备注"
              align='center'>
          </el-table-column>
          <el-table-column
              width="120"
              property="address"
              label="操作"
              align='center'>
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="imagInfoGo(
                            scope.row.busiType,
                            scope.row.policyNo,
                            scope.row.busiNo,
                            scope.row.subbusitype,
                            scope.row.productType,
                            scope.row.docTyp,
                            scope.row.stockID,
                            scope.row.groupNo,
                            scope.row.scanDate,
                            scope.row.scanTime,
                            scope.row.isPrint,
                            scope.row.ishcprint,
                            scope.row.version,
                            scope.row.itemid,
                            scope.row.agentNo,
                            scope.row.updateflag,
                            scope.row.company
                        )" :disabled="!interceptVip(scope.row,scope.index)">影像信息
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页信息 -->
        <el-row>
          <!-- <el-col :span="4" class="button_pagination">
              <el-button type="primary" @click="bathchShow_newObject()">查看</el-button>
          </el-col> -->
          <el-col :span="24">
            <div class="pagination">
              <el-pagination
                  background
                  v-if='paginations.total > 0'
                  :page-sizes="paginations.pageSizes"
                  :page-size="paginations.pageSize"
                  :layout="paginations.layout"
                  :total="paginations.total"
                  :current-page='paginations.pageIndex'
                  @current-change='handleCurrentChange'
                  @size-change='handleSizeChange'>
              </el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>

    <!-- 弹框 备注列表 memoList-->
    <el-dialog
        title="备注列表"
        :visible.sync="memoListDialog"
        width="60%"
        center>
      <el-row>
        <el-col :span="24" class="pb15 pt5">
          <el-button type="danger" plain
                     @click="addMemoInfoDialog = true, MemoInfoDialogShow = true, MemoInfoDialogHistory = false">新增备注
          </el-button>
          <el-button type="danger" plain @click="memoGoHistory()" hidden>查看历史备注</el-button>
        </el-col>
        <div v-if="addMemoInfoDialog">
          <el-row>
            <el-input clearable
                      type="textarea"
                      :autosize="{ minRows: 2, maxRows: 4}"
                      placeholder="请输入内容"
                      v-model="remarkInfo">
            </el-input>
          </el-row>
          <el-row>
            <el-col :span="12" class="pb15 pt15 pr10 text_right">
              <el-button type="danger" plain @click="addMemoInfoDialog = false">取消</el-button>
            </el-col>
            <el-col :span="12" class="pb15 pt15 pr10 text_left">
              <el-button type="danger" class="Defaultbutton" @click="addMemoInfo()">保存</el-button>
            </el-col>
          </el-row>
        </div>

        <!-- 影像备注列表 -->
        <el-col :span="24" v-if="MemoInfoDialogShow">
          <el-table :data="memoListTableData" style="width: 100%">
            <el-table-column min-width="80" prop="serialNumber" label="序号"></el-table-column>
            <el-table-column min-width="120" prop="userid" label="备注人员" show-overflow-tooltip></el-table-column>
            <el-table-column prop="time" label="备注时间" min-width="150" show-overflow-tooltip></el-table-column>
            <el-table-column min-width="120" prop="remark" label="备注信息" align='center'
                             show-overflow-tooltip></el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button
            @click="memoListDialog = false,MemoInfoDialogHistory=false,MemoInfoDialogShow=false,addMemoInfoDialog=false"
            class="Defaultbutton">关闭</el-button>
      </span>
    </el-dialog>
    <el-dialog title="查看历史备注" :visible.sync="MemoInfoDialogHistory" width="40%" center>
      <!-- 历史备注 -->
      <el-col :span="24">
        <el-input type="textarea" autosize placeholder="请输入内容" v-model="sNoteLog"></el-input>
      </el-col>
      <span slot="footer" class="dialog-footer">
        <el-button @click="MemoInfoDialogHistory=false" class="Defaultbutton">关闭</el-button>
      </span>
    </el-dialog>

    <!-- 弹框 添加备注信息 -->
    <!-- <el-dialog
      title="添加备注信息"
      :visible.sync="addMemoInfoDialog"
      width="60%"
      center>
        <el-row>
            <el-col :span="24">
                <el-form ref="form" label-width="120px">
                    <el-form-item label="添加备注信息">
                        <el-input clearable type="textarea" v-model="remarkInfo"></el-input>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addMemoInfoDialog = false">取消</el-button>
        <el-button @click="addMemoInfo()" class="Defaultbutton">提交</el-button>
      </span>
    </el-dialog> -->

    <!-- 弹框 修改记录 -->
    <el-dialog
        title="修改记录"
        :visible.sync="updateRecordDialog"
        width="60%"
        center>
      <el-row>
        <el-col :span="24">
          <el-table
              :data="updateRecordTableData"
              style="width: 100%">
            <el-table-column
                min-width="80"
                prop="serialNumber"
                label="序号">
            </el-table-column>
            <el-table-column
                min-width="120"
                prop="fielddesc"
                label="字段名称"
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                min-width="120"
                prop="srcvalue"
                label="原值"
                width="120"
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                min-width="120"
                prop="modusrid"
                label="操作员"
                align='center'
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                min-width="160"
                prop="modvalue"
                label="修改值"
                align='center'
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                prop="modtime"
                label="操作时间"
                align='center'
                min-width="160"
                show-overflow-tooltip>
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="updateRecordDialog = false" class="Defaultbutton">关闭</el-button>
      </span>
    </el-dialog>
    <!-- 弹框 影像信息 -->
    <el-dialog
        title="影像信息"
        :visible.sync="imagInfoDialog"
        width="60%"
        center>
      <el-form ref="form" label-width="140px" :model="imagInfoParams">
        <el-row>
          <el-col :span="12">
            <el-form-item label="业务类型">
              <!-- <el-input disabled v-model="imagInfoParams.busiType" placeholder=""></el-input> -->
              <el-select v-model="imagInfoParams.busiType" placeholder="" :disabled="disableParam.busiType">
                <el-option
                    v-for="item in busiTypeList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="保单号">
              <el-input v-model="imagInfoParams.policyNo" placeholder="请输入内容"
                        :disabled="disableParam.policyNo"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="受理号">
              <el-input v-model="imagInfoParams.busiNo" placeholder="请输入内容" :disabled="disableParam.busiNo"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单证类型">
              <el-input v-model="imagInfoParams.docTyp" placeholder="电子投保书（意外健康险）"
                        :disabled="disableParam.docTyp"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="存仓号码">
              <el-input v-model="imagInfoParams.stockID" placeholder="" :disabled="disableParam.stockID"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="组号">
              <el-input v-model="imagInfoParams.groupNo" placeholder="请输入内容"
                        :disabled="disableParam.groupNo"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否新受理">
              <el-select v-model="imagInfoParams.subbusitype" placeholder="" :disabled="disableParam.subbusitype">
                <el-option
                    v-for="item in imagInfoDialogSubbusitype"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="险种类型">
              <el-select v-model="imagInfoParams.productType" placeholder="" :disabled="disableParam.productType">
                <el-option
                    v-for="item in imagInfoDialogProductType"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否列印(有效性)">
              <el-select v-model="imagInfoParams.isPrint" placeholder="" :disabled="disableParam.isPrint">
                <el-option
                    v-for="item in isPrintList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否打印HardCopy">
              <el-select v-model="imagInfoParams.ishcprint" placeholder="" :disabled="disableParam.ishcprint">
                <el-option
                    v-for="item in isPrintList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="版本">
              <el-input v-model="imagInfoParams.version" placeholder="请输入内容"
                        :disabled="disableParam.version"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="扫描日期">
              <el-date-picker
                  :disabled="disableParam.scanDate"
                  value-format="yyyy-MM-dd"
                  v-model="imagInfoParams.scanDate"
                  type="date"
                  placeholder="选择日期" id="scanDate">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="扫描时间">
              <el-time-select
                  :disabled="disableParam.scanTime"
                  v-model="imagInfoParams.scanTime"
                  :picker-options="{
                        start: '00:00',
                        step: '00:15',
                        end: '24:00'
                    }"
                  placeholder="选择时间" id="scanTime">
              </el-time-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="imagInfoDialog = false">取消</el-button>
        <el-button :disabled="disableParam.btnCopy" @click="imageInfoAlter('copy')" class="Defaultbutton">拷贝</el-button>
        <el-button :disabled="disableParam.btnModify" @click="imageInfoAlter('modify')"
                   class="Defaultbutton">修改</el-button>
        <el-button :disabled="disableParam.btnDel" @click="imageInfoAlterDelJudge('del')"
                   class="Defaultbutton">删除</el-button>
    </span>
    </el-dialog>

    <div id="imgObjDiv">&nbsp;</div>
  </div>
</template>

<script>
  import {mapGetters} from 'vuex';
  import constant from '@/utils/constant';
	// 导入CMImage影像公用js组件
  import sunCMImage from '@/utils/sunCMImage';
  import {formatDate, strLength} from '@/utils/mUtils';
  import {
    getDocTypeMap,
    getSsyOrgMap,
    ImageExtendAlter,
    ImageExtendCheck,
    ImageQuerySearch, recordLogInfo
  } from "@/api/taskCenter/taskCommon";

  export default {
    data() {
      return {
        planInfo: {
          busiNO: '',//受理号
          policyNO: '',//保单号
          comCode: '',//分支公司
          policyer: '',//投保人姓名
          insured: '',//被保险人姓名
          branchCode: ''//分支公司
        },
        searchParams: {
          //业务查询条件
          busiNO: '',//受理号
          policyNO: '',//保单号
          policyer: '',//投保人姓名
          insured: '',//被保险人姓名
          //影像查询条件
          stockID: '',//存仓号码
          groupNO: '',//组号
          begintime: '',//扫描日期
          serno: '',//电子标识号
          policyno16: '',//短期险保单号
          //辅助条件
          busiType: 'ALL',//业务类型
          birthday: '',//被保险人出生日期
          comCode: '',//分支公司
          productType: '',//险种类型
          isPrint: '',//是否列印（有效性）
          imgsortorder1: '',//排序条件1
          imgsortorder2: '',//排序条件2
          imgsortorder3: '',//排序条件3
          imgsort: '',//排序方式
          docType: '',//文件类型
          isNoCaseno: '',//是否查询无受理号的补充文件

          branchCode: '10',//分支公司
          stype: '',//文件类型
          spurview: '',//查看权限

          sdocType: '',//文件类型
          sproductType: ''//险种类型
        },
        //tree 树——业务信息
        formParams: {
          busiNO: '',//受理号
          policyNO: '',//保单号
          comCode: '',//分支公司
          policyer: '',//投保人姓名
          insured: '',//被保险人姓名
          branchCode: '10'//分支公司
        },
        //树——影像列表
        treeParams: {
          begintime: '',
          busiNO: '',
          busiType: '',
          docType: '',
          doflag: '',
          groupNO: '',
          isPrint: '',
          policyno16: '',
          productType: '',
          stockID: '',

          policyNO: '',
          serno: '',
          comCode: '',
          imgsortorder1: '',//排序条件1
          imgsortorder2: '',//排序条件2
          imgsortorder3: '',//排序条件3
          imgsort: '',
          isNoCaseno: ''
        },
        //辅助条件——业务类型选择
        busiTypeList: [
          {
            value: 'ALL',
            label: '全部'
          }, {
            value: 'NB',
            label: '投保'
          }, {
            value: 'POS',
            label: '保全'
          }, {
            value: 'CLM',
            label: '理赔'
          }],
        //辅助条件——险种信息选择
        productTypeList: [
          {
            value: '传统寿险',
            label: '传统寿险'
          }, {
            value: '意外险',
            label: '意外险'
          }, {
            value: '投资连结',
            label: '投资连结'
          }, {
            value: '重填',
            label: '重填'
          }, {
            value: '变更',
            label: '变更'
          }, {
            value: 'VIP件',
            label: 'VIP件'
          }, {
            value: '绩优agent',
            label: '绩优agent'
          }],
        //影像信息-险种信息选择
        imagInfoDialogProductType: [
          {
            value: '传统寿险',
            label: '传统寿险'
          }, {
            value: '意外险',
            label: '意外险'
          }, {
            value: '银行险',
            label: '银行险'
          }, {
            value: '重填',
            label: '重填'
          }, {
            value: '变更',
            label: '变更'
          }, {
            value: '投资连结',
            label: '投资连结'
          }],
        //辅助条件——是否列印（有效性）选择
        isPrintList: [
          {
            value: '1',
            label: '是'
          }, {
            value: '0',
            label: '否'
          }],
        isNoCasenoList: [
          {
            value: 'Y',
            label: '是'
          }, {
            value: 'N',
            label: '否'
          }],
        //是否新受理
        imagInfoDialogSubbusitype: [
          {
            value: 'Y',
            label: '是'
          }, {
            value: 'N',
            label: '否'
          }
        ],
        //辅助条件——排序条件1
        imgsortorder1List: [{
          value: 'srisk',
          label: '险种类型'
        }, {
          value: 'sgroupno',
          label: '组号'
        }, {
          value: 'sdoctype',
          label: '文件类型'
        }, {
          value: 'sscandate',
          label: '扫描日期'
        }, {
          value: 'sscantime',
          label: '扫描时间'
        }, {
          value: 'sdepotno',
          label: '存仓号码'
        }, {
          value: 'sbusino',
          label: '业务索引'
        }, {
          value: 'spolicyno',
          label: '保单号码'
        }, {
          value: 'sscansite',
          label: '扫描机构'
        }, {
          value: 'sstationed',
          label: '扫描工作站'
        }, {
          value: 'snbtrigger',
          label: '是否触发录单'
        }, {
          value: 'sdocno',
          label: '文件索引'
        }, {
          value: 'sishcprint',
          label: '是否需HardCopy打印'
        }, {
          value: 'ssubbtype',
          label: '是否新受理'
        }, {
          value: 'scompanyid',
          label: '分公司'
        }, {
          value: 'sisprint',
          label: '是否列印'
        }, {
          value: 'sversion',
          label: '版本号'
        }],
        //辅助条件——排序条件2
        imgsortorder2List: [
          {
            value: '',
            label: ''
          }, {
            value: '',
            label: ''
          }],
        //辅助条件——排序条件3
        imgsortorder3List: [
          {
            value: '',
            label: '险种类型'
          }, {
            value: '',
            label: ''
          }],
        //辅助条件——排序方式
        imgsortList: [
          {
            value: '',
            label: '升序'
          }, {
            value: 'desc',
            label: '降序'
          }],
        //机构对象——分支公司
        ssyMap: {},
        //查询条件
        rules: {
          busiNO: '',       //受理号
          policyer: '',     //投保人姓名
          insured: '',   //被保险人姓名
          policyNO: '',     //保单号

          begintime: '',    //扫描日期
          serno: '',        //电子标识号
          stockID: '',      //存仓号码
          groupNO: '',      //组号
          policyno16: '',   //短期险保单号

          birthday: '',     //被保险人出生日期
          branchCode: '', //支公司（默认10）
          busiType: '',  //业务类型
          comCode: '',      //分支公司
          docType: '',      //文件类型
          doflag: '',   //显示查询结果类型（列表还是树形）
          imgsort: '',      //排序方式
          imgsortorder1: '',//排序条件1
          imgsortorder2: '',//排序条件2
          imgsortorder3: '',//排序条件3
          isNoCaseno: '',   //是否查询无受理号的补充文件（当busiType为时）
          isPrint: '',      //是否列印（有效性）
          productType: '',  //险种类型
          purview: '', //查询权限（query和）
          type: ''   //（业务类型访问类型 general\nb\pos\clm）
        },
        optionstableData: [],//文件类型数据列表
        docTypeMap: {},//文件类型对象
        multipleTable: [],
        isNoCasenoShowValue: false,//当查询业务类型为pos（保全）时，查询条件【是否查询无受理号的补充文件】出现
        editCheckId: '',//tree树只选一个
        tableDataList: [],//
        treeDataModuleShow: false,//当搜索结果有tree树时候显示
        tableDataModuleShow: false,//当搜索结果没有tree时候显示
        //查看影像备注信息——查询影像列表
        imageExtendParam: {
          busitype: '',
          doflag: '',
          itemid: '',
          remark: ''
        },
        memoListTableData: [],//查看影像备注信息
        updateRecordTableData: [],//查看影像修改记录
        remarkInfo: '',//修改备注信息
        //影像信息
        imagInfoParams: {
          busiType: '',//业务类型
          policyNo: '',//保单号
          busiNo: '',//受理号
          subbusitype: '',//是否新受理（空时候显示空，不为空时显示该值；子业务类型）
          productType: '',//险种类型
          docTyp: '',//单证类型
          stockID: '',//存仓号
          groupNo: '',//组号
          scanDate: '',//扫描日期
          scanTime: '',//扫描时间
          updateflag: '',//
          isPrint: '',//是否列印（1是，0否）
          ishcprint: '',//是否打印
          version: '',//版本
          itemid: '',//
          pidString: '',//
          company: '',//
          repdate: '',//
          agentNo: '',//
          agentName: '',//

          stype: '',
          scansite: '',
          srepdate: '',
          sagentid: '',
          sagentname: '',
          sbankname: ''
        },
        //影像信息
        imagInfoParamshandle: {
          busiType: '',//业务类型
          policyNo: '',//保单号
          busiNo: '',//受理号
          subbusitype: '',//是否新受理（空时候显示空，不为空时显示该值；子业务类型）
          productType: '',//险种类型
          docTyp: '',//单证类型
          stockID: '',//存仓号
          groupNo: '',//组号
          scanDate: '',//扫描日期
          scanTime: '',//扫描时间
          updateflag: '',//
          isPrint: '',//是否列印（1是，0否）
          ishcprint: '',//是否打印
          version: '',//版本
          itemid: '',//
          pidString: '',//
          company: '',//
          repdate: '',//
          agentNo: '',//
          agentName: '',//

          stype: '',
          scansite: '',
          srepdate: '',
          sagentid: '',
          sagentname: '',
          sbankname: ''
        },

        input: '',
        disabled: false,
        activeNames: ['1'],
        memoListDialog: false, //默认隐藏 备注列表弹框
        addMemoInfoDialog: false,//默认隐藏 备注信息弹框
        updateRecordDialog: false,//默认隐藏 修改记录弹框
        imagInfoDialog: false,//默认隐藏 影像信息修改弹框
        treeData: [],//tree信息存储对象
        // defaultProps: {
        //     children: 'children',
        //     label: 'label'
        // },
        tableData: [//table
          {
            imagtest4: '流水号1',
            imagtest5: '文件类型1',
            imagtest6: '存仓号码1',
            imagtest7: '组号1',
            imagtest8: '扫描日期1',
            imagtest9: '扫描时间1',
            imagtest10: '是否新受理1',
            imagtest11: '是否列水印1',
            imagtest12: '最新备注1',
          }
        ],
        option: '',
        options: [
          {
            value: '1', label: '测试1'
          }, {
            value: '2', label: '测试2'
          }
        ],

        loading: false,
        //需要给分页组件传的信息
        paginationsTree: {
          total: 0,        // 总数
          pageIndex: 1,  // 当前位于哪页
          pageSize: 10,   // 1页显示多少条
          pageSizes: [5, 10, 15, 20],  //每页显示多少条
          layout: "total, sizes, prev, pager, next, jumper"   // 翻页属性
        },
        paginations: {
          total: 0,        // 总数
          pageIndex: 1,  // 当前位于哪页
          pageSize: 10,   // 1页显示多少条
          pageSizes: [5, 10, 15, 20],  //每页显示多少条
          layout: "total, sizes, prev, pager, next, jumper"   // 翻页属性
        },
        pickerOptions1: {
          disabledDate(time) {
            return time.getTime() > Date.now();
          }
        },
        item: {},
        judgeParam: {
          stype: '',//文件类型
          spurview: ''//查看权限
        },
        //用于改变各个元素的可编辑状态
        disableParam: {
          // busitype
          sbusiType: false,//搜索辅助条件——文件类型
          busiType: true,

          policyNO: false,
          busiNo: false,
          subbusitype: false,
          productType: false,
          docTyp: false,
          stockID: false,
          groupNo: false,
          isPrint: false,
          ishcprint: false,
          version: false,
          scanDate: true,
          scanTime: true,

          btnCopy: false,
          btnModify: false,
          btnDel: false,
          //财务影像管理
          scansite: false,
          srepdate: false,
          sagentid: false,
          sagentname: false,
          sbankname: false
        },
        userInfo: {},
        MemoInfoDialogShow: true,//影像备注列表显示
        MemoInfoDialogHistory: false,//影像历史备注显示
        sNoteLog: '',//历史备注信息

      }
    },
    created() {
//          this.getList();
    },
    mounted() {
      // this.getList();
      //分支公司
      getSsyOrgMap().then(data => this.ssyMap = data);
      getDocTypeMap().then(data => this.docTypeMap = data);
      this.showImage_init();
      const param = {
        //综合查询
        type: 'general',
        purview: 'query'
        //新契约影像普通管理
        // type: 'nb',
        // purview: 'low'
        //新契约影像中级管理
        // type: 'nb',
        // purview: 'mid'
        //新契约影像高级管理
        // type: 'nb',
        // purview: 'high'
      }
      this.init(param);
    },
    methods: {
      init(param) {
        this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
        if (this.userInfo == null) { // TODO 本地测试临时使用
          this.userInfo = {account: 'CHNT001755'};
        }
        //查询类型
        if (param.type != null || param.type != "") {
          this.judgeParam.stype = param.type;
          if (this.judgeParam.stype == "general") {
            this.searchParams.busiType = "ALL";
            this.disableParam.busiType = true;//影像信息——业务类型
          } else if (this.judgeParam.stype == "nb") {
            this.searchParams.busiType = "NB";
            this.disableParam.sbusiType = true;
          } else if (this.judgeParam.stype == "pos") {
            this.searchParams.busiType = "POS";
            this.disableParam.sbusiType = true;
          } else if (this.judgeParam.stype == "clm") {
            this.searchParams.busiType = "CLM";
            this.disableParam.sbusiType = true;
          }
        } else {
          this.judgeParam.type = "general";
          this.searchParams.busiType = "ALL";
        }
        //查询权限
        if (param.purview != null || param.purview != "") {
          this.judgeParam.spurview = param.purview;
        } else {
          this.judgeParam.spurview = "query";
        }
      },
      //文件类型选项方法
      handleSelectionChange(val) {
        this.multipleTable = val;
      },
      // 重置查询条件按钮
      resetSearch() {
        if (this.judgeParam.stype == "general") {
          this.searchParams.busiType = "ALL";
        } else if (this.judgeParam.stype == "nb") {
          this.searchParams.busiType = "NB";
        } else if (this.judgeParam.stype == "pos") {
          this.searchParams.busiType = "POS";
        } else if (this.judgeParam.stype == "clm") {
          this.searchParams.busiType = "CLM";
        }

        this.searchParams.busiNO = '';
        this.searchParams.policyNO = '';
        this.searchParams.policyer = '';
        this.searchParams.insured = '';

        this.searchParams.stockID = '';
        this.searchParams.groupNO = '';
        this.searchParams.begintime = '';
        this.searchParams.serno = '';
        this.searchParams.policyno16 = '';

        // this.searchParams.busiType = '';
        this.searchParams.birthday = '';
        this.searchParams.comCode = '';
        this.searchParams.productType = '';
        this.searchParams.isPrint = '';
        this.searchParams.imgsortorder1 = '';
        this.searchParams.imgsortorder2 = '';
        this.searchParams.imgsortorder3 = '';
        this.searchParams.imgsort = '';
        this.searchParams.docType = '';
        this.searchParams.sdocType = [];
        this.searchParams.isNoCaseno = '';
        this.$refs.multipleTable.clearSort();
      },
      //文件类型选择
      selectDocType() {
        console.log("文件类型：" + this.docTypeMap.data);
        console.log("分支公司：" + this.ssyMap.data);
      },
      // 查询列表
      getList() {
        this.searchParams.stype = this.judgeParam.stype;
        this.searchParams.spurview = this.judgeParam.spurview;
        var userId = this.userInfo.account;
        this.$store.dispatch('loading/CHANGE_LOADING', true);

        this.paginationsTree.total = 0;
        this.paginations.total = 0;
        var pageSize = this.paginations.pageSize;
        var pageNumber = this.paginations.pageIndex;

        this.searchParams.docType = this.searchParams.sdocType.toString();
        this.searchParams.productType = this.searchParams.sproductType;

        // console.log("进入判断查询条件类型");
        ImageQuerySearch(this.searchParams, userId, pageSize, pageNumber).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false);
          // console.log(res.resBody);
          if (res.resultCode == constant.SUCCESS && res.resBody) {
            if (res.strDoFlag == "tree") {
              this.treeDataModuleShow = true;
              this.tableDataModuleShow = false;
              const treeData_List = [];

              let policyNo_Map = {}; // 根据保单号划分
              for (var i = 0; i < res.resBody.length; i++) {
                const policyNo = res.resBody[i].policyNo;
                const busiType = res.resBody[i].busiType;

                let busiName = '未知业务';
                if ('NB' == busiType || 'nb' == busiType) {
                  busiName = '核保业务';
                } else if ('POS' == busiType || 'pos' == busiType) {
                  busiName = '保全业务';
                } else if ('CLM' == busiType || 'clm' == busiType) {
                  busiName = '理赔业务';
                } else if ('FIN' == busiType || 'fin' == busiType) {
                  busiName = '财务业务';
                }

                let policyNoMapElement = policyNo_Map[policyNo];
                if (policyNoMapElement) {
                  // 已存在 数层 保单号
                  let isExist = -1;
                  for (let j = 0; j < policyNoMapElement.children.length; j++) {
                    let child = policyNoMapElement.children[j];
                    if (child.busiType == busiType) {
                      isExist = j;
                    }
                  }
                  if (isExist != -1) {
                    // 已存在，直接补充 封装数层 受理号
                    // 封装树层 受理号
                    const busiNo_C_two = {
                      label: ' 受理号：' + res.resBody[i].busiNo,
                      id: 'c' + i,
                      busiNo: res.resBody[i].busiNo,
                      busiType: busiType,
                      policyNo: policyNo,
                      docType: this.searchParams.sdocType.toString(),
                      company: res.resBody[i].company,
                      policyer: res.resBody[i].policyer,
                      insured: res.resBody[i].insured,
                      branch: res.resBody[i].branch
                    };
                    policyNoMapElement.children[isExist].children.push(busiNo_C_two);
                  } else {
                    // 不存在，需新 封装数层 业务类型
                    // 封装树层 业务类型
                    const busiType_C = {
                      label: busiName,
                      id: 'd' + i,
                      busiType: busiType,
                      disabled: true,
                      children: []
                    };
                    const busiNo_C_one = {
                      label: ' 公共资料',
                      id: 'b' + i,
                      busiNo: 'public',
                      busiType: busiType,
                      policyNo: policyNo,
                      docType: this.searchParams.sdocType.toString(),
                      company: '',
                      policyer: '',
                      insured: '',
                      branch: ''
                    };
                    // 封装树层 受理号
                    const busiNo_C_two = {
                      label: ' 受理号：' + res.resBody[i].busiNo,
                      id: 'c' + i,
                      busiNo: res.resBody[i].busiNo,
                      busiType: busiType,
                      policyNo: policyNo,
                      docType: this.searchParams.sdocType.toString(),
                      company: res.resBody[i].company,
                      policyer: res.resBody[i].policyer,
                      insured: res.resBody[i].insured,
                      branch: res.resBody[i].branch
                    };
                    busiType_C.children.push(busiNo_C_one);
                    busiType_C.children.push(busiNo_C_two);
                    policyNoMapElement.children.push(busiType_C);
                    policyNo_Map[policyNo] = policyNoMapElement;
                  }
                } else {
                  // 不存在 需新封装数层 保单号
                  // 封装树层 保单号
                  const policy_C = {
                    label: ' 保单号: ' + policyNo,
                    id: 'a' + i,
                    disabled: true,
                    children: []
                  };
                  // 封装树层 业务类型
                  const busiType_C = {
                    label: busiName,
                    id: 'd' + i,
                    busiType: busiType,
                    disabled: true,
                    children: []
                  };
                  const busiNo_C_one = {
                    label: ' 公共资料',
                    id: 'b' + i,
                    busiNo: 'public',
                    busiType: busiType,
                    policyNo: policyNo,
                    docType: this.searchParams.sdocType.toString(),
                    company: '',
                    policyer: '',
                    insured: '',
                    branch: ''
                  };
                  // 封装树层 受理号
                  const busiNo_C_two = {
                    label: ' 受理号：' + res.resBody[i].busiNo,
                    id: 'c' + i,
                    busiNo: res.resBody[i].busiNo,
                    busiType: busiType,
                    policyNo: policyNo,
                    docType: this.searchParams.sdocType.toString(),
                    company: res.resBody[i].company,
                    policyer: res.resBody[i].policyer,
                    insured: res.resBody[i].insured,
                    branch: res.resBody[i].branch
                  };
                  busiType_C.children.push(busiNo_C_one);
                  busiType_C.children.push(busiNo_C_two);
                  policy_C.children.push(busiType_C);
                  policyNo_Map[policyNo] = policy_C;
                }
              }

              // 封装树层 投被保人
              if (this.searchParams.insured) {
                const treeNum = {
                  label: ' 被保人：' + res.resBody[0].insured,
                  id: 1,
                  disabled: true,
                  children: []
                };
                for (const policyNo_one in policyNo_Map) {
                  treeNum.children.push(policyNo_Map[policyNo_one]);
                }
                treeData_List.push(treeNum);
              } else if (this.searchParams.policyer) {
                const treeNum = {
                  label: ' 投保人：' + res.resBody[0].policyer,
                  id: 1,
                  disabled: true,
                  children: []
                };
                for (const policyNo_one in policyNo_Map) {
                  treeNum.children.push(policyNo_Map[policyNo_one]);
                }
                treeData_List.push(treeNum);
              } else {
                for (const policyNo_one in policyNo_Map) {
                  treeData_List.push(policyNo_Map[policyNo_one]);
                }
              }
              this.treeData = treeData_List;

              // 只有一条数据时，默认读取影像列表
              if (res.resBody.length >= 1) {
                const itemParam = {
                  label: ' 受理号：' + res.resBody[0].busiNo,
                  id: 'c0',
                  busiNo: res.resBody[0].busiNo,
                  busiType: res.resBody[0].busiType,
                  policyNo: res.resBody[0].policyNo,
                  docType: this.searchParams.sdocType.toString(),
                  company: res.resBody[0].company,
                  policyer: res.resBody[0].policyer,
                  insured: res.resBody[0].insured,
                  branch: res.resBody[0].branch
                }
                this.nodeClick(itemParam);
              }
            } else {
              this.tableDataModuleShow = true;
              this.treeDataModuleShow = false;
              const tableDataList_s = [];
              for (var i = 0; i < res.resBody.imageList.length; i++) {
                const obj = {
                  serno: res.resBody.imageList[i].serno,
                  docTyp: res.resBody.imageList[i].docTyp,
                  stockID: res.resBody.imageList[i].stockID,
                  groupNo: res.resBody.imageList[i].groupNo,
                  scanDate: res.resBody.imageList[i].scanDate,
                  scanTime: res.resBody.imageList[i].scanTime,
                  subbusitype: res.resBody.imageList[i].subbusitype,
                  isPrint: res.resBody.imageList[i].isPrint,
                  remark: res.resBody.imageList[i].remark,
                  busiType: res.resBody.imageList[i].busiType,
                  itemid: res.resBody.imageList[i].itemid,
                  policyNo: res.resBody.imageList[i].policyNo,
                  busiNo: res.resBody.imageList[i].busiNo,
                  productType: res.resBody.imageList[i].productType,
                  ishcprint: res.resBody.imageList[i].ishcprint,
                  version: res.resBody.imageList[i].version,
                  agentNo: res.resBody.imageList[i].agentNo,
                  updateflag: res.resBody.imageList[i].updateflag,

                  imgServerUrl: res.imageServerUrl
                }
                tableDataList_s.push(obj);
              }
              this.tableDataList = tableDataList_s;
              if (tableDataList_s.length > 0) {
                this.paginations.total = res.resBody.total;
                this.paginationsTree.total = res.resBody.total;
              }
            }
          }
        }).catch(err => {
          this.$store.dispatch('loading/CHANGE_LOADING', false);
        });
      },
      checkChange(item, node, self) {
        if (node == true) {
          this.editCheckId = item.id;
          this.$refs.tree.setCheckedKeys([item.id]);
        } else {
          if (this.editCheckId == item.id) {
            this.$refs.tree.setCheckedKeys([item.id]);
          }
        }
      },
      nodeClick(item, node, self) {
        if (this.item.label != undefined) {
          if (this.item.label != item.label) {
            this.paginationsTree.pageIndex = 1;
            this.paginationsTree.pageSize = 10;
          }
        }
        this.paginationsTree.total = 0;
        var pageSize = this.paginationsTree.pageSize;
        var pageNumber = this.paginationsTree.pageIndex;
        this.item = item;
        this.editCheckId = item.id;
        this.$refs.tree.setCheckedKeys([item.id]);
        this.planInfo.busiNO = item.busiNo;
        this.planInfo.policyNO = item.policyNo;
        this.planInfo.comCode = item.company;
        this.planInfo.policyer = item.policyer;
        this.planInfo.insured = item.insured;
        this.planInfo.branchCode = item.branch;

        var userId = this.userInfo.account;
        this.$store.dispatch('loading/CHANGE_LOADING', true);

        this.treeParams.busiNO = item.busiNo;
        this.treeParams.busiType = item.busiType;
        this.treeParams.docType = item.docType;
        this.treeParams.policyNO = item.policyNo;
        this.treeParams.doflag = 'caseimage';
        if (item.busiType == 'CLM'){
          this.treeParams.policyNO = '';
        }
        ImageQuerySearch(this.treeParams, userId, pageSize, pageNumber).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false)
          if (res.resultCode == constant.SUCCESS && res.resBody) {
            if (res.strDoFlag != "tree") {
              this.treeDataModuleShow = true;
              this.tableDataModuleShow = false;
              const tableDataList_s = [];
              for (var i = 0; i < res.resBody.imageList.length; i++) {
                const obj = {
                  serno: res.resBody.imageList[i].serno,
                  docTyp: res.resBody.imageList[i].docTyp,
                  stockID: res.resBody.imageList[i].stockID,
                  groupNo: res.resBody.imageList[i].groupNo,
                  scanDate: res.resBody.imageList[i].scanDate,
                  scanTime: res.resBody.imageList[i].scanTime,
                  subbusitype: res.resBody.imageList[i].subbusitype,
                  isPrint: res.resBody.imageList[i].isPrint,
                  remark: res.resBody.imageList[i].remark,
                  busiType: res.resBody.imageList[i].busiType,
                  itemid: res.resBody.imageList[i].itemid,
                  policyNo: res.resBody.imageList[i].policyNo,
                  busiNo: res.resBody.imageList[i].busiNo,
                  productType: res.resBody.imageList[i].productType,
                  ishcprint: res.resBody.imageList[i].ishcprint,
                  version: res.resBody.imageList[i].version,
                  agentNo: res.resBody.imageList[i].agentNo,
                  updateflag: res.resBody.imageList[i].updateflag,

                  imgServerUrl: res.imageServerUrl
                }
                tableDataList_s.push(obj);
              }
              this.tableDataList = tableDataList_s;
              if (tableDataList_s.length > 0) {
                this.paginationsTree.total = res.resBody.total;
              }
            }
          }
        }).catch(err => {
          this.$store.dispatch('loading/CHANGE_LOADING', false);
        })
      },
      //正则判断是否包含特殊字符
      checkSpecialChar(str) {
        var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>《》/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？ ]");
        if (pattern.test(str)) {
          return true;
        }
        return false;
      },
      //正则判断是否包含中文
      checkChinese(str) {
        if (/.*[\u4e00-\u9fa5]+.*$/.test(str)) {
          return true;
        }
        return false;
      },
      //正则判断是否包含数字
      checkNum(str) {
        if (/\d/.test(str)) {
          return true;
        }
        return false;
      },
      //判断查询条件类型
      judgeDoflag() {
        if (this.searchParams.birthday == null) {
          this.searchParams.birthday = "";
        }
        if (this.searchParams.begintime == null) {
          this.searchParams.begintime = "";
        }
        // console.log(this.searchParams)
        var isInput = false;
        var queryflag = "image";
        //影像条件查询
        if (this.searchParams.stockID != "" || this.searchParams.groupNO != "" || this.searchParams.begintime != ""
          || this.searchParams.serno != "") {
          var stockIDcsc = this.checkSpecialChar(this.searchParams.stockID);
          var groupNOcsc = this.checkSpecialChar(this.searchParams.groupNO);
          var sernocsc = this.checkSpecialChar(this.searchParams.serno);
          var stockIDcc = this.checkChinese(this.searchParams.stockID);
          var groupNOcc = this.checkChinese(this.searchParams.groupNO);
          var sernocc = this.checkChinese(this.searchParams.serno);
          if (stockIDcsc || stockIDcc) {
            this.$message({
              message: '请正确输入仓库号！',
              type: 'warning'
            });
            return;
          }
          if (groupNOcsc || groupNOcc) {
            this.$message({
              message: '请正确输入组号！',
              type: 'warning'
            });
            return;
          }
          if (sernocsc || sernocc) {
            this.$message({
              message: '请正确输入电子标识号！',
              type: 'warning'
            });
            return;
          }
          isInput = true;
        }
        if (this.searchParams.policyno16 != "") {
          var policyno16csc = this.checkSpecialChar(this.searchParams.policyno16);
          var policyno16cc = this.checkChinese(this.searchParams.policyno16);
          if (policyno16csc || policyno16cc || this.searchParams.policyno16.length != 16) {
            this.$message({
              message: '请正确输入短期险保单号！',
              type: 'warning'
            });
            return;
          }
          isInput = true;
        }
        //业务条件查询
        if (this.searchParams.busiNO != "" || this.searchParams.policyNO != "" ||
          this.searchParams.policyer != "" || this.searchParams.insured != "") {
          var busiNOcsc = this.checkSpecialChar(this.searchParams.busiNO);
          var policyNOcsc = this.checkSpecialChar(this.searchParams.policyNO);
          var policyercsc = this.checkSpecialChar(this.searchParams.policyer);
          var insuredcsc = this.checkSpecialChar(this.searchParams.insured);

          var busiNOcc = this.checkChinese(this.searchParams.busiNO);
          var policyNOcc = this.checkChinese(this.searchParams.policyNO);
          // var policyercn =  this.checkNum(this.searchParams.policyer);
          // var insuredcn =  this.checkNum(this.searchParams.insured);
          if (busiNOcsc || busiNOcc) {
            this.$message({
              message: '请正确输入受理号！',
              type: 'warning'
            });
            return;
          }
          if (policyNOcsc || policyNOcc) {
            this.$message({
              message: '请正确输入保单号！',
              type: 'warning'
            });
            return;
          }
          // if(policyercsc || policyercn){
          if (policyercsc) {
            this.$message({
              message: '请正确输入投保人姓名！',
              type: 'warning'
            });
            return;
          }
          // if(insuredcsc || insuredcn){
          if (insuredcsc) {
            this.$message({
              message: '请正确输入被保人姓名！',
              type: 'warning'
            });
            return;
          }
          queryflag = "tree";
          isInput = true;
        }
        this.searchParams.doflag = queryflag;

        //特殊查询：POS无受理号的补充文件的查询
        if (this.searchParams.isNoCaseno == "Y") {
          if (!(this.searchParams.stockID != "" || this.searchParams.groupNO != "" || this.searchParams.begintime != "")) {
            this.$message({
              message: '查询POS无受理号的补充文件，影像查询条件至少要有一个，请重输！',
              type: 'warning'
            });
            return;
          }
          if (this.searchParams.busiNO != "") {
            this.$message({
              message: '查询POS无受理号的补充文件，不需要输入受理号查询条件，请重输！',
              type: 'warning'
            });
            return;
          }
        }
        if (this.searchParams.birthday == null) {
          this.searchParams.birthday = "";
        }
        if (isInput) {
          this.paginations.pageIndex = 1;
          this.getList();
        } else {
          this.$message({
            message: '查询条件中没有必选条件，必选条件至少要有一个，请重输！',
            type: 'warning'
          });
        }
      },
      isNoCasenoShow() {
        if (this.searchParams.busiType == 'POS') {
          this.isNoCasenoShowValue = true;
        } else {
          this.isNoCasenoShowValue = false;
        }
      },
      // 审计日志需求  --lvjg 20211217
      recordAuditLogInfo(busMod, multipleTable) {
        let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
        // 时间格式 yyyymmddhhMMss
        var dateStr = formatDate(new Date(), 2);
        var businessInfos = [];
        for (var i = 0; i < multipleTable.length; i++) {
          businessInfos.push({"applNum": multipleTable[i].busiNo
            , "chdrNum": multipleTable[i].policyNo
            , "otherNum": multipleTable[i].serno});
        }
        let params = {
          "head": {
            "sysID": "ILMP",
            "password": "lHW5bPjxPnIIoSR5OFZE9A=="
          },
          "body": {
            "userNum": userInfo.account,
            "optDate": dateStr.substr(0,8),
            "optTime": dateStr.substr(8),
            "userIP": "",
            "userMachine": "",
            "menuName": busMod,
            "funcDesc": "查看客户影像资料",
            "busAction": "R",
            "businessInfos": businessInfos,
            "sensiDesc": busMod + "查看客户影像",
            "remark": ""
          }
        };

        recordLogInfo(params).then(res => {
          console.log(res);
        }).catch(err => {
          console.log(err);
        });
      },
      bathchShow_newObject() {
        console.log(this.multipleTable);

        // 审计日志需求  --lvjg 20211217
        this.recordAuditLogInfo("契约综合查询", this.multipleTable);

        if (this.multipleTable.length > 0) {
          // this.multipleTable.val[0];
          console.log(this.multipleTable[0]);

          let imageDisplay;
          let str = "";
          for (var i = 0; i < this.multipleTable.length; i++) {
            if (str == "") {
              str = this.multipleTable[i].busiType + "," + this.multipleTable[i].itemid;
            } else {
              str = str + "|" + this.multipleTable[i].busiType + "," + this.multipleTable[i].itemid;
            }
          }
          try {
            console.log(str);
            if (str != ",") {
              /*
              imageDisplay = document.getElementById("imageDisplay");
              imageDisplay.DisplayFile(str, this.multipleTable[0].imgServerUrl);
              */
              /* google访问ie内核修改 ---------- sunline注册表模式*/
              sunCMImage.showImage(str,this.multipleTable[0].imgServerUrl);
            }
          } catch (e) {
            this.$message.error('页面加载错误：' + e);
          }

        } else {
          this.$message({
            message: '至少选择一条才可查看! ',
            type: 'warning'
          });
        }
      },
      showImage_init() {
        //kaka 预加载影像查看组件
        let imgObjDiv = document.getElementById("imgObjDiv");
        imgObjDiv.innerHTML = "<object id='imageDisplay' classid='clsid:DF02961E-E2F3-41a6-AACB-010EF4A90F9F'></object>";
        //kaka 预加载影像查看组件
      },
      showImage_newObject(item) {
        // vip数据管控start
        if(item.busiType.indexOf("*") !== -1){
          this.$message({
            message: '该数据为vip保单,暂无操作权限!',
            type: 'error'
          });
          return false
        }
        // vip数据管控end
        console.log('查看影像的信息：', item);

        // 审计日志需求  --lvjg 20211217
        var multipleTable = [item];
        console.log("影像信息-->", multipleTable);
        this.recordAuditLogInfo("契约综合查询", multipleTable);

        let imageDisplay;
        // var imageDisplay;
        const str = item.busiType + "," + item.itemid; // busiType,itemid
        try {
          if (str != ",") {
            /*
            imageDisplay = document.getElementById("imageDisplay");
            imageDisplay.DisplayFile(str, item.imgServerUrl); // imgServerUrl
            */
						/* google访问ie内核修改 ---------- sunline注册表模式*/
						sunCMImage.showImage(str,item.imgServerUrl);
          }
        } catch (e) {
          this.$message.error('页面加载错误：' + e);
        }
      },
      //查看影像备注信息
      memoGo(busiType, itemid) {
        // vip数据管控start
        if(busiType.indexOf("*") !== -1){
          this.$message({
            message: '该数据为vip保单,暂无操作权限!',
            type: 'error'
          });
          return false
        }
        // vip数据管控end
        this.memoListDialog = true;
        this.MemoInfoDialogHistory = false;
        this.MemoInfoDialogShow = true;
        this.addMemoInfoDialog = false

        var userId = this.userInfo.account;
        this.imageExtendParam.doflag = 'querymemo';
        this.imageExtendParam.busitype = busiType;
        this.imageExtendParam.itemid = itemid;
        this.$store.dispatch('loading/CHANGE_LOADING', true)
        // console.log("进入查看影像备注信息");
        ImageExtendCheck(this.imageExtendParam, userId).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false)
          console.log(res.resBody);
          if (res.resultCode == constant.SUCCESS && res.resBody) {
            const memoListTableData_s = [];
            for (var i = 0; i < res.resBody.length; i++) {
              const obj = {
                serialNumber: i + 1,
                time: res.resBody[i].time,
                remark: res.resBody[i].remark,
                userid: res.resBody[i].userid,
                busitype: res.busitype,
                itemid: res.itemid,
              }
              memoListTableData_s.push(obj);
            }
            this.memoListTableData = memoListTableData_s;
          }
        }).catch(err => {
          // console.log("搜索结果出来了，失败了么");
          this.$store.dispatch('loading/CHANGE_LOADING', false);
        })
      },
      //历史备注
      memoGoHistory() {
        // this.memoListDialog = true;
        this.MemoInfoDialogHistory = true;
        // this.MemoInfoDialogShow = false;
        // this.addMemoInfoDialog=false

        var userId = this.userInfo.account;
        this.imageExtendParam.doflag = 'notelog';
        this.$store.dispatch('loading/CHANGE_LOADING', true)
        ImageExtendCheck(this.imageExtendParam, userId).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false)
          console.log(res.resBody);
          if (res.resultCode == constant.SUCCESS && res.resBody) {
            this.sNoteLog = res.resBody.sNoteLog;
            if (this.sNoteLog == null || this.sNoteLog == "") {
              this.sNoteLog = "无历史备注";
            }
          }
        }).catch(err => {
          // console.log("搜索结果出来了，失败了么");
          this.$store.dispatch('loading/CHANGE_LOADING', false);
        })
      },
      //新增备注信息
      addMemoInfo() {
        this.MemoInfoDialogHistory = false;
        this.MemoInfoDialogShow = true;
        if (typeof this.remarkInfo == "undefined" || this.remarkInfo == null || this.remarkInfo == "") {
          this.$message({
            message: '请输入备注信息! ',
            type: 'warning'
          });
          return;
        } else {
			//拦截备注长度，不能超过数据库的256个字符长度
			let length = strLength(this.remarkInfo);
			if(length > 254){
				this.$message({
				  message: '备注信息长度超过256个字符，请重新输入 ',
				  type: 'warning'
				});
				return;
			}
          // console.log("新增备注信息");
          console.log(this.remarkInfo);

          var userId = this.userInfo.account;
          this.imageExtendParam.doflag = 'addmemo';
          this.imageExtendParam.remark = this.remarkInfo;
          this.$store.dispatch('loading/CHANGE_LOADING', true)
          ImageExtendCheck(this.imageExtendParam, userId).then(res => {
            this.$store.dispatch('loading/CHANGE_LOADING', false)
            console.log(res.resBody);
            if (res.resultCode == constant.SUCCESS && res.resBody) {
              const memoListTableData_s = [];
              for (var i = 0; i < res.resBody.length; i++) {
                const obj = {
                  serialNumber: i + 1,
                  time: res.resBody[i].time,
                  remark: res.resBody[i].remark,
                  userid: res.resBody[i].userid,
                  busitype: res.busitype,
                  itemid: res.itemid,
                }
                memoListTableData_s.push(obj);
              }
              this.memoListTableData = memoListTableData_s;
            }
          }).catch(err => {
            this.$store.dispatch('loading/CHANGE_LOADING', false);
          })
          this.addMemoInfoDialog = false;
        }

      },

      //查看影像修改记录
      updateRecordGo(busiType, itemid) {
        // vip数据管控start
        if(busiType.indexOf("*") !== -1){
          this.$message({
            message: '该数据为vip保单,暂无操作权限!',
            type: 'error'
          });
          return false
        }
        // vip数据管控end
        this.updateRecordDialog = true;

        var userId = this.userInfo.account;
        this.imageExtendParam.doflag = 'modihistory';
        this.imageExtendParam.busitype = busiType;
        this.imageExtendParam.itemid = itemid;
        this.$store.dispatch('loading/CHANGE_LOADING', true)
        // console.log("进入查看影像修改记录");
        ImageExtendCheck(this.imageExtendParam, userId).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false)
          console.log(res.resBody);
          if (res.resultCode == constant.SUCCESS && res.resBody) {
            const updateRecordTableData_s = [];
            for (var i = 0; i < res.resBody.length; i++) {
              const obj = {
                serialNumber: i + 1,
                fielddesc: res.resBody[i].fielddesc,
                srcvalue: res.resBody[i].srcvalue,
                modusrid: res.resBody[i].modusrid,
                modvalue: res.resBody[i].modvalue,
                modtime: res.resBody[i].modtime
              }
              updateRecordTableData_s.push(obj);
            }
            this.updateRecordTableData = updateRecordTableData_s;
          }
        }).catch(err => {
          // console.log("搜索结果出来了，失败了么");
          this.$store.dispatch('loading/CHANGE_LOADING', false);
        })

      },
      imagInfoGo(busiType, policyNo, busiNo, subbusitype, productType, docTyp,
                 stockID, groupNo, scanDate, scanTime, isPrint, ishcprint, version, itemid, agentNo,
                 updateflag, company) {
        // vip数据管控start
        if(busiType.indexOf("*") !== -1){
          this.$message({
            message: '该数据为vip保单,暂无操作权限!',
            type: 'error'
          });
          return false
        }
        // vip数据管控end
        this.imagInfoDialog = true;
        this.purviewForm();
        this.imagInfoParams.busiType = busiType;
        this.imagInfoParams.policyNo = policyNo;
        this.imagInfoParams.busiNo = busiNo;
        this.imagInfoParams.subbusitype = subbusitype;
        this.imagInfoParams.docTyp = docTyp;
        this.imagInfoParams.stockID = stockID;
        this.imagInfoParams.groupNo = groupNo;
        this.imagInfoParams.scanDate = scanDate;
        this.imagInfoParams.scanTime = scanTime;
        this.imagInfoParams.isPrint = isPrint;
        this.imagInfoParams.ishcprint = ishcprint;
        this.imagInfoParams.version = version;
        this.imagInfoParams.itemid = itemid;
        this.imagInfoParams.agentNo = agentNo;
        this.imagInfoParams.updateflag = updateflag;
        this.imagInfoParams.company = company;

        this.imagInfoParamshandle.busiType = busiType;
        this.imagInfoParamshandle.policyNo = policyNo;
        this.imagInfoParamshandle.busiNo = busiNo;
        this.imagInfoParamshandle.subbusitype = subbusitype;
        this.imagInfoParamshandle.docTyp = docTyp;
        this.imagInfoParamshandle.stockID = stockID;
        this.imagInfoParamshandle.groupNo = groupNo;
        this.imagInfoParamshandle.scanDate = scanDate;
        this.imagInfoParamshandle.scanTime = scanTime;
        this.imagInfoParamshandle.isPrint = isPrint;
        this.imagInfoParamshandle.ishcprint = ishcprint;
        this.imagInfoParamshandle.version = version;
        this.imagInfoParamshandle.itemid = itemid;
        this.imagInfoParamshandle.agentNo = agentNo;
        this.imagInfoParamshandle.updateflag = updateflag;
        this.imagInfoParamshandle.company = company;

        if (productType == null || productType == "null") {
          this.imagInfoParams.productType = "";
          this.imagInfoParamshandle.productType = "";
        } else {
          this.imagInfoParams.productType = productType;
          this.imagInfoParamshandle.productType = productType;
        }
      },
      //影像信息——拷贝、修改、删除
      //影像信息——拷贝、修改、删除
      imageInfoAlter(param) {
        this.enableForm();
        var userId = this.userInfo.account;
        this.imagInfoParams.stype = param;
        ImageExtendAlter(this.imagInfoParams, userId).then(res => {
          this.$store.dispatch('loading/CHANGE_LOADING', false)
          if (res.resultCode == constant.SUCCESS) {
            if (param == 'copy') {
              this.$message({
                message: '拷贝影像执行成功！',
                type: 'success'
              });
            } else if (param == 'modify') {
              this.$message({
                message: '修改影像索引成功！',
                type: 'success'
              });
            } else if (param == 'del') {
              this.$message({
                message: '删除影像执行成功！',
                type: 'success'
              });
            }
          }
          this.disableForm();
          // 关掉影像信息弹框
          this.imagInfoDialog = false;
          // 刷新影像列表
          this.nodeClick(this.item);
        }).catch(err => {
          // console.log("搜索结果出来了，失败了么");
          this.imagInfoDialog = false;
          this.$store.dispatch('loading/CHANGE_LOADING', false);

        })
      },
      imageInfoAlterDelJudge(param) {
        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.imageInfoAlter(param);
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
          return;
        });
      },
      //影像信息——修改——权限控制
      purviewForm() {
        this.disableParam.busiType = true;
        //新契约管理
        if (this.judgeParam.stype == "nb" || this.judgeParam.stype == "nbdocflow"
          || this.judgeParam.stype == "hbdocflow_p" || this.judgeParam.stype == "hbdocflow") {
          if (this.judgeParam.spurview == "low") {
            //新契约管理-普通权限
            this.disableParam.policyNo = true;
            this.disableParam.busiNo = true;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = true;
            this.disableParam.docTyp = true;
            this.disableParam.stockID = true;
            this.disableParam.groupNo = true;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = true;
            this.disableParam.version = true;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "mid") {
            //新契约管理-中级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = true;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "high") {
            //新契约管理-高级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = true;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = false;
          }
        } else if (this.judgeParam.stype == "pos" || this.judgeParam.stype == "docflow" || this.judgeParam.stype == "posuser") {
          //保全管理
          if (this.judgeParam.stype == "low") {
            //保全管理——普通权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = true;
            this.disableParam.subbusitype = false;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = false;
            this.disableParam.version = false;
            this.disableParam.scanDate = false;
            this.disableParam.scanTime = false;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "mid") {
            //保全管理——中级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = false;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = false;
            this.disableParam.version = false;
            this.disableParam.scanDate = false;
            this.disableParam.scanTime = false;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "high") {
            //保全管理——高级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = false;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = false;
            this.disableParam.version = false;
            this.disableParam.scanDate = false;
            this.disableParam.scanTime = false;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = false;
          }
        } else if (this.judgeParam.stype == "clm") {
          //理赔管理
          if (this.judgeParam.stype == "low") {
            //理赔管理——普通权限
            this.disableParam.policyNo = true;
            this.disableParam.busiNo = true;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = true;
            this.disableParam.docTyp = true;
            this.disableParam.stockID = true;
            this.disableParam.groupNo = true;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = true;
            this.disableParam.version = true;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "mid") {
            //理赔管理——中级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = false;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = false;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;
          } else if (this.judgeParam.spurview == "high") {
            //理赔管理——高级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = false;
            this.disableParam.productType = false;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = false;
            this.disableParam.isPrint = false;
            this.disableParam.ishcprint = false;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = false;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = false;
          }
        } else if (this.judgeParam.stype == "fin") {
          //财务影像管理
          if (this.judgeParam.stype == "low") {
            //财务影像管理——普通权限
            this.disableParam.policyNo = true;
            this.disableParam.busiNo = true;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = true;
            this.disableParam.docTyp = true;
            this.disableParam.stockID = true;
            this.disableParam.groupNo = true;
            this.disableParam.isPrint = true;
            this.disableParam.ishcprint = true;
            this.disableParam.version = true;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = true;
            this.disableParam.btnDel = true;

            this.disableParam.scansite = true;
            this.disableParam.srepdate = true;
            this.disableParam.sagentid = true;
            this.disableParam.sagentname = true;
            this.disableParam.sbankname = true;
          } else if (this.judgeParam.spurview == "mid") {
            //财务影像管理——中级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = true;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = true;
            this.disableParam.isPrint = true;
            this.disableParam.ishcprint = true;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = true;

            this.disableParam.scansite = false;
            this.disableParam.srepdate = false;
            this.disableParam.sagentid = false;
            this.disableParam.sagentname = false;
            this.disableParam.sbankname = false;
          } else if (this.judgeParam.spurview == "high") {
            //财务影像管理——高级权限
            this.disableParam.policyNo = false;
            this.disableParam.busiNo = false;
            this.disableParam.subbusitype = true;
            this.disableParam.productType = true;
            this.disableParam.docTyp = false;
            this.disableParam.stockID = false;
            this.disableParam.groupNo = true;
            this.disableParam.isPrint = true;
            this.disableParam.ishcprint = true;
            this.disableParam.version = false;
            this.disableParam.scanDate = true;
            this.disableParam.scanTime = true;

            this.disableParam.btnCopy = true;
            this.disableParam.btnModify = false;
            this.disableParam.btnDel = false;

            this.disableParam.scansite = false;
            this.disableParam.srepdate = false;
            this.disableParam.sagentid = false;
            this.disableParam.sagentname = false;
            this.disableParam.sbankname = false;
          }
        } else {
          //综合查询
          this.disableParam.policyNo = true;
          this.disableParam.busiNo = true;
          this.disableParam.subbusitype = true;
          this.disableParam.productType = true;
          this.disableParam.docTyp = true;
          this.disableParam.stockID = true;
          this.disableParam.groupNo = true;
          this.disableParam.isPrint = true;
          this.disableParam.ishcprint = true;
          this.disableParam.version = true;
          this.disableParam.scanDate = true;
          this.disableParam.scanTime = true;

          this.disableParam.btnCopy = true;
          this.disableParam.btnModify = true;
          this.disableParam.btnDel = true;
        }
      },
      enableForm() {
        this.disableParam.busiType = false;

        this.disableParam.policyNo = false;
        this.disableParam.busiNo = false;
        this.disableParam.subbusitype = false;
        this.disableParam.productType = false;
        this.disableParam.docTyp = false;
        this.disableParam.stockID = false;
        this.disableParam.groupNo = false;
        this.disableParam.isPrint = false;
        this.disableParam.ishcprint = false;
        this.disableParam.version = false;
        this.disableParam.scanDate = false;
        this.disableParam.scanTime = false;

        this.disableParam.btnCopy = false;
        this.disableParam.btnModify = false;
        this.disableParam.btnDel = false;

      },
      disableForm() {
        this.disableParam.busiType = true;

        this.disableParam.policyNo = true;
        this.disableParam.busiNo = true;
        this.disableParam.subbusitype = true;
        this.disableParam.productType = true;
        this.disableParam.docTyp = true;
        this.disableParam.stockID = true;
        this.disableParam.groupNo = true;
        this.disableParam.isPrint = true;
        this.disableParam.ishcprint = true;
        this.disableParam.version = true;
        this.disableParam.scanDate = true;
        this.disableParam.scanTime = true;

        this.disableParam.btnCopy = true;
        this.disableParam.btnModify = true;
        this.disableParam.btnDel = true;
      },
      // 每页多少条切换
      handleSizeChangeTree(pageSize) {
        this.paginationsTree.pageSize = pageSize;
        this.nodeClick(this.item);
      },
      // 上下分页
      handleCurrentChangeTree(page) {
        this.paginationsTree.pageIndex = page;
        this.nodeClick(this.item);
      },
      // 每页多少条切换
      handleSizeChange(pageSize) {
        this.paginations.pageSize = pageSize;
        this.getList();
      },
      // 上下分页
      handleCurrentChange(page) {
        this.paginations.pageIndex = page;
        this.getList();
      },
      // 根据条件查询列表
      subGetList() {
        Object.keys(this.planInfo).forEach(key => (this.planInfo[key] = ''));
        this.tableDataList = [];
        this.treeData = [];
        this.judgeDoflag();
        // this.paginations.pageIndex=1;
        // this.getList();
      },

      showorhide() {
        this.isShow = !this.isShow;
      },
      // vip权限拦截
      interceptVip(row,index) {
        let rowStr = JSON.stringify(row);
        if (rowStr.indexOf("****") > -1) {
            return false;
        }
        return true;
      },
    },
    computed: {
      ...mapGetters(['tags']),
    },
  }
</script>
<style lang="less" scoped>
  .fillcontain {
    padding-bottom: 0;
  }

  .contain {
    background: #fff;
    padding: 10px;
    margin-bottom: 20px;
  }

  .pagination {
    padding: 10px 20px;
    text-align: right;
  }

  .button_pagination {
    padding: 10px 20px;
    text-align: left;
  }

  .search_container {
    padding: 20px 20px 0 20px;
  }

  .operationIcon {
    // padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 0 3px #f9f9f9;

    .el-icon-camera { //影像图标
      color: #409EFF;
      font-size: 16px;
    }

    .el-icon-tickets {
      font-size: 16px;
      color: #409EFF;
    }

    .el-icon-edit-outline {
      font-size: 16px;
      color: #409EFF;
    }
  }

  .common-box {
    padding-bottom: 15px;
  }

  .common-lab {
    line-height: normal !important;
    text-align: right;

    .labelName {
      text-align: right;
    }
  }

</style>
